<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>表格</title>
    <style>
       table{
            /* border-collapse: collapse; */
            width: 500px;
            /* border: 1px solid #999; */

            /* 技巧 */
            margin: auto;
    
        }
        th,td{
            border: 1px solid #999;
            height: 30px;
            
            text-align: center;
        }
    </style>
</head>
<body>
    <!-- 表格最全的语法 -->
    <!-- table>thead>tr>th*3 -->
    <!-- <table border="1" width="500"> -->
    <table>
        <caption> <h3>学生信息</h3> </caption>
        <thead>
            <tr>
                <th><input type="checkbox"></th>
                <th>序号</th>
                <th>姓名</th>
                <th>性别</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td><input type="checkbox"></td>
                <td>1001</td>
                <td>success</td>
                <td>male</td>
            </tr>
            <tr>
                <td><input type="checkbox"></td>
                <td>1001</td>
                <td>success</td>
                <td>male</td>
            </tr>
            <tr>
                <td><input type="checkbox"></td>
                <td>1001</td>
                <td>success</td>
                <td>male</td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
            </tr>
        </tfoot>
    </table>

    <hr>

    <table>
        <caption> <h3>行和列的合并</h3> </caption>
        <thead>
            <tr>
                <th><input type="checkbox"></th>
                <th>序号</th>
                <th>姓名</th>
                <th>性别</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td><input type="checkbox"></td>
                <td>1001</td>
                <td>success</td>
                <td rowspan="3">male</td>
            </tr>
            <tr>
                <td><input type="checkbox"></td>
                <td>1001</td>
                <td>success</td>
               
            </tr>
            <tr>
                <td><input type="checkbox"></td>
                <td>1001</td>
                <td>success</td>
               
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td colspan="4"></td>
            </tr>
        </tfoot>
    </table>

    <hr>
    <!-- thead tbody tfoot
         注意点是 "爷爷和孙子的关系", 上面三个省略的情况下
         那么所有的tr默认都是在tbody中.
    -->
    <table>
        <caption> <h3>精简的写法</h3> </caption>
        
            <tr>
                <th><input type="checkbox"></th>
                <th>序号</th>
                <th>姓名</th>
                <th>性别</th>
            </tr>
       
        
            <tr>
                <td><input type="checkbox"></td>
                <td>1001</td>
                <td>success</td>
                <td>male</td>
            </tr>
            <tr>
                <td><input type="checkbox"></td>
                <td>1001</td>
                <td>success</td>
                <td>male</td>
            </tr>
            <tr>
                <td><input type="checkbox"></td>
                <td>1001</td>
                <td>success</td>
                <td>male</td>
            </tr>
        
       
            <tr>
                <td></td>
                <td></td>
                <td></td>
                <td></td>
            </tr>
      
    </table>
</body>
</html>